package cn.rslee.uaas.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 描述：
 * 
 * <pre>HISTORY
 * ****************************************************************************
 *  ID   DATE                    PERSON          REASON
 *  1    2016年3月11日         rslee               Create
 * ****************************************************************************
 * </pre>
 * @author rslee
 * @since 1.0
 */
@Entity 
@Table(name = "REPORT_ACCESS_PAGE") 
public class AccessPage implements Serializable {
	
	public static final String PAGE_VISITED = "visited"; // 访问界面
	public static final String PAGE_REFERER = "referer";// 访问入口

	/**  */
	private static final long serialVersionUID = -3369605169367074143L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="ID")
	private Long id;
	
	@Column(name = "SYS_CODE")
	private String sysCode;  //系统编码
	
	@Column(name = "TYPES")
	private String types;  //类型
	
	@Column(name = "PAGE")
	private String page;  //访问页面
	
	@Column(name = "PV")
	private int pv;  //访问量
	
	@Column(name = "PROP")
	private Double prop;  //占比
	
	@Column(name = "DAYS")
	@Temporal(TemporalType.DATE)
	private Date days;  //统计日期
	
	@Column(name = "CREATE_TM")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTm; //创建日期

	public AccessPage(String sysCode, String types, String page,
			int pv, Double prop, Date days, Date createTm) {
		super();
		this.sysCode = sysCode;
		this.types = types;
		this.page = page;
		this.pv = pv;
		this.prop = prop;
		this.days = days;
		this.createTm = createTm;
	}

	public AccessPage() {
		super();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getSysCode() {
		return sysCode;
	}

	public void setSysCode(String sysCode) {
		this.sysCode = sysCode;
	}

	public String getTypes() {
		return types;
	}

	public void setTypes(String types) {
		this.types = types;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public int getPv() {
		return pv;
	}

	public void setPv(int pv) {
		this.pv = pv;
	}

	public Double getProp() {
		return prop;
	}

	public void setProp(Double prop) {
		this.prop = prop;
	}

	public Date getDays() {
		return days;
	}

	public void setDays(Date days) {
		this.days = days;
	}

	public Date getCreateTm() {
		return createTm;
	}

	public void setCreateTm(Date createTm) {
		this.createTm = createTm;
	}

	@Override
	public String toString() {
		return "AccessReferer [id=" + id + ", sysCode=" + sysCode + ", types="
				+ types + ", page=" + page + ", pv=" + pv + ", prop=" + prop
				+ ", days=" + days + ", createTm=" + createTm + "]";
	}
	
	

}
